package com.xyht.sca_s.student_manage_system.modules.teachAndStaffCheckInApplication.controller;


import com.xyht.sca_s.student_manage_system.common.commonReturn.ResponseResult;
import com.xyht.sca_s.student_manage_system.common.desEncodeAndDecode.annotation.SecretBody;
import com.xyht.sca_s.student_manage_system.modules.teachAndStaffCheckInApplication.entity.vo.SmsTeachAdministrativePromiseManageVO;
import com.xyht.sca_s.student_manage_system.modules.teachAndStaffCheckInApplication.service.SmsTeachAdministrativePromiseManageService;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author XYHT
 * @since 2023-07-05
 */
@SecretBody
@RestController
@RequestMapping("/teachAndStaffCheckInApplication")
public class SmsTeachAdministrativePromiseManageController {
    @Autowired
    SmsTeachAdministrativePromiseManageService smsTeachAdministrativePromiseManageService;
    @ApiModelProperty("添加入住承诺")
    @PostMapping("/add")
    public ResponseResult addPromise(@RequestBody SmsTeachAdministrativePromiseManageVO promiseManage){
        return smsTeachAdministrativePromiseManageService.addPromise(promiseManage);
    }
    @ApiModelProperty("查询入住承诺（最新一条）")
    @GetMapping("/select")
    public ResponseResult select(){
        return smsTeachAdministrativePromiseManageService.select();
    }
}

